<?php
/**
 *@file reportlist.php
 *@author YangLiu
 *@date 2015-7-13 14:13:22
 *@brief  
 */
namespace haibao\comment\business;

use \haibao\comment\data\banlist as CommentReportLogData;
use \haibao\comment\data\reportlist as CommentBanData ;

class Reportlist extends \haibao\comment\business\Base{
    
	public static function getReportList($commentReportLogFilter){
		$commentReportLogData = new CommentReportLogData();
		return $commentReportLogData->getAll($commentReportLogFilter);
	}
	
	public static function getReportUserName($reportUserNameList){
	    $CommentReportLogData = new CommentReportLogData;
	    return $CommentReportLogData->getReportUserNameById($reportUserNameList);
	}
	
	public static function addReportLog($model){
		if(!$model->CommentId){
			throw new BusinessException('评论ID不能为空！');
		}
		if(!isset($model->ReportUserId)){
			throw new BusinessException('举报用户不能为空！');
		}
		$CommentReportLogData = new CommentReportLogData;
		$CommentReportLogData->add($model);
		$commentData = new \haibao\comment\data\Comments();
		$commentData->addReportNum($model->CommentId);
	}

	public static function getBanByIds($commentUserIdList){
	    $commentBanData = new CommentBanData();
	    return $commentBanData->getCommentBan($commentUserIdList);
	}
	
}